package com.google.demo.view;

import com.google.demo.R;
import com.google.demo.model.HistoryItem;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.view.View.OnClickListener;

public class HistoryView extends LinearLayout implements OnClickListener {
	private TextView mNameEmployee;
	private TextView mDateWork;
	private TextView mNameShop;
	private TextView mDescription;
	public HistoryView(Context context,HistoryItem historyItem) {
		super(context);
		// TODO Auto-generated constructor stub
		LayoutInflater li = (LayoutInflater)this.getContext().getSystemService(context.LAYOUT_INFLATER_SERVICE);
		li.inflate(R.layout.history_item, this, true);
		mNameEmployee = (TextView)findViewById(R.id.txtv_name_employee);
		mDateWork = (TextView)findViewById(R.id.txtv_date);
		mNameShop  = (TextView)findViewById(R.id.txtv_name_shop);
		mDescription = (TextView)findViewById(R.id.txtv_description);
		
		mNameEmployee.setText(historyItem.getmNameEmployee());
		mDateWork.setText(historyItem.getmDateWork());
		mNameShop.setText(historyItem.getmNameShop());
		mDescription.setText(historyItem.getmDescription());
		
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
	}

}
